//pearl
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const ll P = 1e9 + 7;
int n, m, x;
char s[100010];

ll qp(ll x, ll y){
    ll ans = 1;
    while(y){
        if(y & 1){
            ans = ans * x % P;
        }
        x = x * x % P;
        y >>= 1;
    }
    return ans;
}

namespace solve12{
    int f[1010][34][34];
    int main(){
        int y = 0;
        for(int i = 1; i <= m; ++ i){
            y += (s[i]-'0') * (1 << i-1);
        }
        memset(f, 0, sizeof(f));
        f[0][0][0] = 1;
        for(int i = 1; i <= n; ++ i){
            for(int j = 0; j < (1<<m); ++ j){
                if(i == x && j != y){
                    continue;
                }
                for(int pj = 0; pj < (1<<m); ++ pj){
                    for(int k = 0; k < (1<<m); ++ k){
                        int nw = j * pj % (1<<m);
                        (f[i][j][k^nw] += f[i-1][pj][k]) %= P;
                    }
                }
            }
        }
        ll ans = 0;
        for(int i = 0; i < (1 << m); ++ i){
            for(int j = 0; j < (1 << m); ++ j){
                ans = (ans + (ll)f[n][i][j] * j) % P;
            }
        }
        printf("%lld\n", ans);
        return 0;
    }
}
namespace solve3{
    int main(){
        ll ans = qp(2, (n-1)/2) + P - 1;
        ans %= P;
        ans = ans * qp(2, (n-2)/2) % P;
        printf("%lld\n", ans);
        return 0;
    }
}
namespace solve5{
    struct mat{
        ll a[4][4];
        mat operator * (const mat &b) const {
            mat c;
            memset(c.a, 0, sizeof(c.a));
            for(int k = 0; k < 4; ++ k){
                for(int i = 0; i < 4; ++ i){
                    for(int j = 0; j < 4; ++ j){
                        c.a[i][j] = (c.a[i][j] + a[i][k] * b.a[k][j]) % P;
                    }
                }
            }
            return c;
        }
    } q[3];
    mat qp(mat x, int y){
        mat ans;
        memset(ans.a, 0, sizeof(ans.a));
        ans.a[0][0] = ans.a[1][1] = ans.a[2][2] = ans.a[3][3] = 1;
        while(y){
            if(y & 1){
                ans = ans * x;
            }
            x = x * x;
            y >>= 1;
        }
        return ans;
    }
    int main(){
        q[0].a[0][0] = q[0].a[1][1] = q[0].a[2][0] = q[0].a[3][1] = 1;
        q[2].a[0][0] = q[2].a[1][1] = q[2].a[2][0] = q[2].a[3][1] = 1;
        q[1].a[0][2] = q[1].a[1][3] = q[1].a[2][3] = q[1].a[3][2] = 1;
        q[2].a[0][2] = q[2].a[1][3] = q[2].a[2][3] = q[2].a[3][2] = 1;
        mat ans = qp(q[2], x-1);
        ans = ans * q[s[1]-'0'];
        ans = ans * qp(q[2], n-x);
        printf("%lld\n", (ans.a[0][1] + ans.a[0][3]) % P);
        return 0;
    }
}

int main(){
    freopen("pearl.in", "r", stdin);
    freopen("pearl.out", "w", stdout);
    scanf("%d%d%d%s", &n, &m, &x, s+1);
    if(n <= 1000 && m <= 5){
        solve12::main();
    } else if(x == 1 && m == 1 && s[1] == '0'){
        solve3::main();
    } else if(m == 1){
        solve5::main();
    }
    return 0;
}